package org.tote.dao;

import java.util.List;

import org.tote.model.User;

public interface UserDao extends BasicCrudDao<User, Long> {

	public List<User> getAllUsers();

	/**
	 * Retrieves filtered users from DB according to usersFilter
	 *  
	 * @param page - number of current page
	 * @param limit - limit of users to retrieve
	 * @param usersFilter - variable, users are filtering by
	 * @return list of filtered users
	 */
	public List<User> getFilteredUsersPage(int page, int limit, String usersFilter);

	public void removeList(List<String> nameList);

	public List<User> getUserListExcluding(List<String> nameList);

	/**
	 * Retrieves filtered users from DB according to usersFilter
	 * 
	 * @param nameList - list of already included names
	 * @param page - number of current page
	 * @param limit - limit of users to retrieve
	 * @param usersFilter - variable, users are filtering by
	 * @return list of filtered users
	 */
	public List<User> getFilteredUsersExcludingPage(List<Long> excludeList, int page, int limit,
			String usersFilter);

	public List<User> getUserList(List<String> nameList);

	public User findByLogin(String login);

	public User findByToken(String token);

	/**
	 * @param usersFitler - value to filter users
	 * @return quantity of users in database.
	 */
	public int getFilteredUsersCount(String usersFilter);

	/**
	 * 
	 * @param nameList
	 *            - list of the users' namers.
	 * @param usersFilter - value to filter users
	 * @return amount of the excluding user
	 */
	public int getFilteredUsersExcludingCount(List<Long> excludeList, String usersFilter);

	User findByOpenId(String openId);
}
